package com.zhenwgang.listen_books.view_object;

import lombok.SneakyThrows;

import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.List;

/**
 * @author Violet
 * @date 2022/07/21 20:33
 **/
public class ResultView {
    public Integer aid;
    public String username;
    public String cover;
    public String title;
    public List<TrackView> trackList = new ArrayList<>();
    public List<AlbumView> albumList = new ArrayList<>();

    @SneakyThrows
    public void set(ResultSet rs) {
        this.aid = rs.getInt("aid");
        this.username = rs.getString("username");
        this.cover = rs.getString("cover");
        this.title = rs.getString("title");
    }
}